package com.conversationboard.api;

import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.core.SecurityContext;

public class LoggedInProcessor implements Processor {

	/* Format: <LoggedIn></LoggedIn> */
	
	@Override
	public String processXml(String xml, SecurityContext securityContext, HttpServletRequest request) throws ApiException {

		if (securityContext.getUserPrincipal() != null) {
			return "<LoggedIn>Yes</LoggedIn>";
		} else {
			return "<LoggedIn>No</LoggedIn>";
		}

	}

}
